From 4734f491063e6b2d43e273a178da06e93a92080d Mon Sep 17 00:00:00 2001 From: "kaf24@firebug.cl.cam.ac.uk" Date: Thu, 30 Mar 2006 14:31:57 +0100 Subject: [PATCH] Use AFLAGS for assembly files so we can "+=" more flags. From: Jimi Xenidis Signed-off-by: Keir Fraser --- xen/Rules.mk | 5 ++++- xen/arch/ia64/Makefile | 2 +- xen/arch/x86/Makefile | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/xen/Rules.mk b/xen/Rules.mk index f887ea44f5..ade8b87a1e 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -55,11 +55,14 @@ ifneq ($(max_phys_cpus),) CFLAGS-y += -DMAX_PHYS_CPUS=$(max_phys_cpus) endif +AFLAGS-y += -D__ASSEMBLY__ + ALL_OBJS := $(ALL_OBJS-y) CFLAGS := $(strip $(CFLAGS) $(CFLAGS-y)) +AFLAGS := $(strip $(AFLAGS) $(AFLAGS-y)) %.o: %.c $(HDRS) Makefile $(CC) $(CFLAGS) -c $< -o $@ %.o: %.S $(HDRS) Makefile - $(CC) $(CFLAGS) -D__ASSEMBLY__ -c $< -o $@ + $(CC) $(CFLAGS) $(AFLAGS) -c $< -o $@ diff --git a/xen/arch/ia64/Makefile b/xen/arch/ia64/Makefile index 444f4eb30b..381c6d739b 100644 --- a/xen/arch/ia64/Makefile +++ b/xen/arch/ia64/Makefile @@ -76,7 +76,7 @@ $(BASEDIR)/include/asm-ia64/.offsets.h.stamp: # I'm sure a Makefile wizard would know a better way to do this xen.lds.s: xen/xen.lds.S - $(CC) -E $(CPPFLAGS) -P -DXEN -D__ASSEMBLY__ \ + $(CC) -E $(CPPFLAGS) -P -DXEN $(AFLAGS) \ -o xen.lds.s xen/xen.lds.S clean:: FORCE diff --git a/xen/arch/x86/Makefile b/xen/arch/x86/Makefile index 3fa20dd7d0..c7a2e6ae1d 100644 --- a/xen/arch/x86/Makefile +++ b/xen/arch/x86/Makefile @@ -72,7 +72,7 @@ asm-offsets.s: $(TARGET_SUBARCH)/asm-offsets.c $(HDRS) $(CC) $(CFLAGS) -S -o $@ $< xen.lds: $(TARGET_SUBARCH)/xen.lds.S $(HDRS) - $(CC) $(CFLAGS) -P -E -Ui386 -D__ASSEMBLY__ -o $@ $< + $(CC) $(CFLAGS) -P -E -Ui386 $(AFLAGS) -o $@ $< boot/mkelf32: boot/mkelf32.c $(HOSTCC) $(HOSTCFLAGS) -o $@ $< -- 2.30.2